﻿using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;

namespace ChuanYe.CountyFireManagement.EF.MySQL.Models
{
    public partial class CountyFireManagementContext : DbContext
    {
        public CountyFireManagementContext()
        {
        }

        public CountyFireManagementContext(DbContextOptions<CountyFireManagementContext> options)
            : base(options)
        {
        }

        public virtual DbSet<Alarmignoretime> Alarmignoretime { get; set; }
        public virtual DbSet<Carinfo> Carinfo { get; set; }
        public virtual DbSet<Department> Department { get; set; }
        public virtual DbSet<Firealarmtype> Firealarmtype { get; set; }
        public virtual DbSet<Firecause> Firecause { get; set; }
        public virtual DbSet<Firecontinuereport> Firecontinuereport { get; set; }
        public virtual DbSet<Fireexpire> Fireexpire { get; set; }
        public virtual DbSet<Firefield> Firefield { get; set; }
        public virtual DbSet<Firefieldattach> Firefieldattach { get; set; }
        public virtual DbSet<Firefightingforce> Firefightingforce { get; set; }
        public virtual DbSet<Firefinalreport> Firefinalreport { get; set; }
        public virtual DbSet<Firefirstreport> Firefirstreport { get; set; }
        public virtual DbSet<Fireforcesupport> Fireforcesupport { get; set; }
        public virtual DbSet<Firefrontcommand> Firefrontcommand { get; set; }
        public virtual DbSet<Fireheadquarter> Fireheadquarter { get; set; }
        public virtual DbSet<Fireheadquartermember> Fireheadquartermember { get; set; }
        public virtual DbSet<Fireinfo> Fireinfo { get; set; }
        public virtual DbSet<Fireinform> Fireinform { get; set; }
        public virtual DbSet<Firelocationrecord> Firelocationrecord { get; set; }
        public virtual DbSet<Firemisreport> Firemisreport { get; set; }
        public virtual DbSet<Firerecordconfig> Firerecordconfig { get; set; }
        public virtual DbSet<Firereportout> Firereportout { get; set; }
        public virtual DbSet<Fireresponse> Fireresponse { get; set; }
        public virtual DbSet<Firesite> Firesite { get; set; }
        public virtual DbSet<Firestation> Firestation { get; set; }
        public virtual DbSet<Firestationattach> Firestationattach { get; set; }
        public virtual DbSet<Fireteamdepartment> Fireteamdepartment { get; set; }
        public virtual DbSet<Fireteamresponse> Fireteamresponse { get; set; }
        public virtual DbSet<Gpsdevice> Gpsdevice { get; set; }
        public virtual DbSet<Gpsdeviceconfig> Gpsdeviceconfig { get; set; }
        public virtual DbSet<Gpsdevicerecord> Gpsdevicerecord { get; set; }
        public virtual DbSet<Linchpin> Linchpin { get; set; }
        public virtual DbSet<Locainfo> Locainfo { get; set; }
        public virtual DbSet<Locatype> Locatype { get; set; }
        public virtual DbSet<Locavideo> Locavideo { get; set; }
        public virtual DbSet<Maplayer> Maplayer { get; set; }
        public virtual DbSet<Message> Message { get; set; }
        public virtual DbSet<Messagesendtype> Messagesendtype { get; set; }
        public virtual DbSet<Othermessage> Othermessage { get; set; }
        public virtual DbSet<Position> Position { get; set; }
        public virtual DbSet<Power> Power { get; set; }
        public virtual DbSet<Record> Record { get; set; }
        public virtual DbSet<Role> Role { get; set; }
        public virtual DbSet<Rolelevel> Rolelevel { get; set; }
        public virtual DbSet<Rolepower> Rolepower { get; set; }
        public virtual DbSet<Smsinfo> Smsinfo { get; set; }
        public virtual DbSet<Smsmodel> Smsmodel { get; set; }
        public virtual DbSet<Taskinfo> Taskinfo { get; set; }
        public virtual DbSet<Taskinfoimage> Taskinfoimage { get; set; }
        public virtual DbSet<Userareaprobability> Userareaprobability { get; set; }
        public virtual DbSet<Userinfo> Userinfo { get; set; }
        public virtual DbSet<Videoalarm> Videoalarm { get; set; }

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (!optionsBuilder.IsConfigured)
            {
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. See http://go.microsoft.com/fwlink/?LinkId=723263 for guidance on storing connection strings.
                optionsBuilder.UseMySQL("server=172.16.1.67;userid=cy_cs1;pwd=123456;port=3306;database=CountyFireManagement;sslmode=none;");
            }
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Alarmignoretime>(entity =>
            {
                entity.HasKey(e => e.IgnoreId)
                    .HasName("PRIMARY");

                entity.ToTable("alarmignoretime");

                entity.Property(e => e.IgnoreId)
                    .HasColumnName("IgnoreID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.LocaId)
                    .IsRequired()
                    .HasColumnName("LocaID")
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Value).HasColumnType("int(11)");
            });

            modelBuilder.Entity<Carinfo>(entity =>
            {
                entity.HasKey(e => e.CarId)
                    .HasName("PRIMARY");

                entity.ToTable("carinfo");

                entity.Property(e => e.CarId)
                    .HasColumnName("CarID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.AliasName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Brand)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.CarName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.CarNo)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.IsEnable).HasColumnType("int(11)");
            });

            modelBuilder.Entity<Department>(entity =>
            {
                entity.HasKey(e => e.DepId)
                    .HasName("PRIMARY");

                entity.ToTable("department");

                entity.Property(e => e.DepId)
                    .HasColumnName("DepID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.DepName)
                    .IsRequired()
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.Sort).HasColumnType("int(11)");
            });

            modelBuilder.Entity<Firealarmtype>(entity =>
            {
                entity.HasKey(e => e.TypeId)
                    .HasName("PRIMARY");

                entity.ToTable("firealarmtype");

                entity.Property(e => e.TypeId)
                    .HasColumnName("TypeID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Sort).HasColumnType("int(11)");

                entity.Property(e => e.TypeName)
                    .HasMaxLength(100)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Firecause>(entity =>
            {
                entity.HasKey(e => e.CauseId)
                    .HasName("PRIMARY");

                entity.ToTable("firecause");

                entity.Property(e => e.CauseId)
                    .HasColumnName("CauseID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.CauseName)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Sort).HasColumnType("int(11)");
            });

            modelBuilder.Entity<Firecontinuereport>(entity =>
            {
                entity.HasKey(e => e.ContinueReportId)
                    .HasName("PRIMARY");

                entity.ToTable("firecontinuereport");

                entity.Property(e => e.ContinueReportId)
                    .HasColumnName("ContinueReportID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.ContinueReportContent)
                    .IsRequired()
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Fireexpire>(entity =>
            {
                entity.HasKey(e => e.ExpireId)
                    .HasName("PRIMARY");

                entity.ToTable("fireexpire");

                entity.Property(e => e.ExpireId)
                    .HasColumnName("ExpireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.MessageContent)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.MessageType).HasColumnType("int(11)");

                entity.Property(e => e.RecordType).HasColumnType("int(11)");

                entity.Property(e => e.Value).HasColumnType("int(11)");
            });

            modelBuilder.Entity<Firefield>(entity =>
            {
                entity.HasKey(e => e.FieldId)
                    .HasName("PRIMARY");

                entity.ToTable("firefield");

                entity.Property(e => e.FieldId)
                    .HasColumnName("FieldID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.EstimateAltitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.EstimateLatitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.EstimateLongitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.FieldContent)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RecordType).HasColumnType("int(11)");

                entity.Property(e => e.ReviseAltitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ReviseLatitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ReviseLongitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.SceneContent)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.SceneUserId)
                    .HasColumnName("SceneUserID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.SendMode).HasColumnType("int(11)");

                entity.Property(e => e.SendStatus).HasColumnType("int(11)");

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Firefieldattach>(entity =>
            {
                entity.HasKey(e => e.FieldAttachId)
                    .HasName("PRIMARY");

                entity.ToTable("firefieldattach");

                entity.Property(e => e.FieldAttachId)
                    .HasColumnName("FieldAttachID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Direction)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.FieldId)
                    .HasColumnName("FieldID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.SceneFile)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.ShotAltitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ShotLatitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ShotLongitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Firefightingforce>(entity =>
            {
                entity.HasKey(e => e.FightingForceId)
                    .HasName("PRIMARY");

                entity.ToTable("firefightingforce");

                entity.Property(e => e.FightingForceId)
                    .HasColumnName("FightingForceID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.HeadquarterId)
                    .HasColumnName("HeadquarterID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Status).HasColumnType("int(11)");

                entity.Property(e => e.TeamNum).HasColumnType("int(11)");

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Firefinalreport>(entity =>
            {
                entity.HasKey(e => e.FinalReportId)
                    .HasName("PRIMARY");

                entity.ToTable("firefinalreport");

                entity.Property(e => e.FinalReportId)
                    .HasColumnName("FinalReportID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.AlarmTypeId)
                    .HasColumnName("AlarmTypeID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.ArmyPeopleSum).HasColumnType("int(11)");

                entity.Property(e => e.ArmyRankSum).HasColumnType("int(11)");

                entity.Property(e => e.BurnedArea)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.BurnedAreaUnit)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.BurnedTreeAge).HasColumnType("int(11)");

                entity.Property(e => e.BurnedTreeDieSum).HasColumnType("int(11)");

                entity.Property(e => e.BurnedTreeSum).HasColumnType("int(11)");

                entity.Property(e => e.BurnedTreeTypeSum).HasColumnType("int(11)");

                entity.Property(e => e.CaseFiles)
                    .HasMaxLength(5000)
                    .IsUnicode(false);

                entity.Property(e => e.Casualties)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.CauseId)
                    .HasColumnName("CauseID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.FinalReportContent)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.ForestBurnedArea)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ForestBurnedAreaUnit)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Humidity)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.IdentifyFiles)
                    .HasMaxLength(5000)
                    .IsUnicode(false);

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.IsSupplementary).HasColumnType("int(11)");

                entity.Property(e => e.Leader)
                    .HasMaxLength(11)
                    .IsUnicode(false);

                entity.Property(e => e.OtherSituation)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.ProfessionalPeopleSum).HasColumnType("int(11)");

                entity.Property(e => e.ProfessionalRankSum).HasColumnType("int(11)");

                entity.Property(e => e.StationPeopleSum).HasColumnType("int(11)");

                entity.Property(e => e.StationRankSum).HasColumnType("int(11)");

                entity.Property(e => e.Temperature)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.TownPeopleSum).HasColumnType("int(11)");

                entity.Property(e => e.TownRankSum).HasColumnType("int(11)");

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Weather)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.WindDirection)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.WindPower)
                    .HasMaxLength(200)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Firefirstreport>(entity =>
            {
                entity.HasKey(e => e.FirstReportId)
                    .HasName("PRIMARY");

                entity.ToTable("firefirstreport");

                entity.Property(e => e.FirstReportId)
                    .HasColumnName("FirstReportID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.FirstReportContent)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.Ip)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Fireforcesupport>(entity =>
            {
                entity.HasKey(e => e.ForceSupportId)
                    .HasName("PRIMARY");

                entity.ToTable("fireforcesupport");

                entity.Property(e => e.ForceSupportId)
                    .HasColumnName("ForceSupportID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.ForceSupportContent)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Firefrontcommand>(entity =>
            {
                entity.HasKey(e => e.FrontCommandId)
                    .HasName("PRIMARY");

                entity.ToTable("firefrontcommand");

                entity.Property(e => e.FrontCommandId)
                    .HasColumnName("FrontCommandID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.CommanderName)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.CommanderTel)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.HeadquarterMemberIds)
                    .HasColumnName("HeadquarterMemberIDs")
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Latitude)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Longitude)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Fireheadquarter>(entity =>
            {
                entity.HasKey(e => e.HeadquarterId)
                    .HasName("PRIMARY");

                entity.ToTable("fireheadquarter");

                entity.Property(e => e.HeadquarterId)
                    .HasColumnName("HeadquarterID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.AddressCounty)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.AddressTown)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.AddressVillage)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Name)
                    .IsRequired()
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ParentId)
                    .HasColumnName("ParentID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Sort).HasColumnType("int(11)");

                entity.Property(e => e.Tel)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Fireheadquartermember>(entity =>
            {
                entity.HasKey(e => e.HeadquarterMemberId)
                    .HasName("PRIMARY");

                entity.ToTable("fireheadquartermember");

                entity.Property(e => e.HeadquarterMemberId)
                    .HasColumnName("HeadquarterMemberID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.HeadquarterId)
                    .HasColumnName("HeadquarterID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Name)
                    .IsRequired()
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Phone)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.PositionId)
                    .HasColumnName("PositionID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.TeamDepartmentId)
                    .HasColumnName("TeamDepartmentID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Tel)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Fireinfo>(entity =>
            {
                entity.HasKey(e => e.FireId)
                    .HasName("PRIMARY");

                entity.ToTable("fireinfo");

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Address)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.AddressCounty)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.AddressTown)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.AddressVillage)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.Alarm)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.AlarmContent)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.ChangeFireId)
                    .HasColumnName("ChangeFireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.FireName)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.IsChange).HasColumnType("int(11)");

                entity.Property(e => e.IsState).HasColumnType("int(11)");

                entity.Property(e => e.IsSupplementary).HasColumnType("int(11)");

                entity.Property(e => e.ReporterName)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.ReporterPhone)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.ReporterUnit)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.ReporterWorknum)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.Smscontent)
                    .HasColumnName("SMSContent")
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Fireinform>(entity =>
            {
                entity.HasKey(e => e.InformId)
                    .HasName("PRIMARY");

                entity.ToTable("fireinform");

                entity.Property(e => e.InformId)
                    .HasColumnName("InformID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.InformContent)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Status).HasColumnType("int(11)");

                entity.Property(e => e.TargetUserId).HasColumnType("int(11)");

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Firelocationrecord>(entity =>
            {
                entity.HasKey(e => e.LocationRecordId)
                    .HasName("PRIMARY");

                entity.ToTable("firelocationrecord");

                entity.Property(e => e.LocationRecordId)
                    .HasColumnName("LocationRecordID")
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Accuracy)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Imei)
                    .HasColumnName("IMEI")
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Latitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Longitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.RealName)
                    .HasMaxLength(255)
                    .IsUnicode(false);

                entity.Property(e => e.RecordType).HasColumnType("int(11)");

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Firemisreport>(entity =>
            {
                entity.HasKey(e => e.MisreportId)
                    .HasName("PRIMARY");

                entity.ToTable("firemisreport");

                entity.Property(e => e.MisreportId)
                    .HasColumnName("MisreportID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MisreportContent)
                    .IsRequired()
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.ReplyContent)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.ReplyResult).HasColumnType("int(11)");

                entity.Property(e => e.ReplyUserId)
                    .HasColumnName("ReplyUserID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Firerecordconfig>(entity =>
            {
                entity.HasKey(e => e.RecordConfigId)
                    .HasName("PRIMARY");

                entity.ToTable("firerecordconfig");

                entity.Property(e => e.RecordConfigId)
                    .HasColumnName("RecordConfigID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Condition)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.RecordType).HasColumnType("int(11)");

                entity.Property(e => e.RoleLevelId)
                    .HasColumnName("RoleLevelID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Sort).HasColumnType("int(11)");

                entity.Property(e => e.SubRecordTypes)
                    .IsRequired()
                    .HasMaxLength(200)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Firereportout>(entity =>
            {
                entity.HasKey(e => e.ReportOutId)
                    .HasName("PRIMARY");

                entity.ToTable("firereportout");

                entity.Property(e => e.ReportOutId)
                    .HasColumnName("ReportOutID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ReportOutContent)
                    .IsRequired()
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Fireresponse>(entity =>
            {
                entity.HasKey(e => e.ResponseId)
                    .HasName("PRIMARY");

                entity.ToTable("fireresponse");

                entity.Property(e => e.ResponseId)
                    .HasColumnName("ResponseID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Level).HasColumnType("int(11)");

                entity.Property(e => e.ResponseContent)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Firesite>(entity =>
            {
                entity.HasKey(e => e.SiteId)
                    .HasName("PRIMARY");

                entity.ToTable("firesite");

                entity.Property(e => e.SiteId)
                    .HasColumnName("SiteID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Altitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Content)
                    .HasMaxLength(1000)
                    .IsUnicode(false);

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Latitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Longitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.RecordType).HasColumnType("int(11)");

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Firestation>(entity =>
            {
                entity.HasKey(e => e.StationId)
                    .HasName("PRIMARY");

                entity.ToTable("firestation");

                entity.Property(e => e.StationId)
                    .HasColumnName("StationID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.EstimateAltitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.EstimateLatitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.EstimateLongitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.IsReburn).HasColumnType("int(1)");

                entity.Property(e => e.RecordType).HasColumnType("int(11)");

                entity.Property(e => e.ReviseAltitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ReviseLatitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ReviseLongitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.SceneUserId)
                    .HasColumnName("SceneUserID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.SendMode).HasColumnType("int(11)");

                entity.Property(e => e.SendStatus).HasColumnType("int(11)");

                entity.Property(e => e.StationContent)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Firestationattach>(entity =>
            {
                entity.HasKey(e => e.StationAttachId)
                    .HasName("PRIMARY");

                entity.ToTable("firestationattach");

                entity.Property(e => e.StationAttachId)
                    .HasColumnName("StationAttachID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Direction)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.SceneFile)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.ShotAltitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ShotLatitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ShotLongitude)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.StationId)
                    .HasColumnName("StationID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Fireteamdepartment>(entity =>
            {
                entity.HasKey(e => e.TeamDepartmentId)
                    .HasName("PRIMARY");

                entity.ToTable("fireteamdepartment");

                entity.Property(e => e.TeamDepartmentId)
                    .HasColumnName("TeamDepartmentID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Name)
                    .IsRequired()
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.Phone)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.Sort).HasColumnType("int(11)");

                entity.Property(e => e.Tel)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Fireteamresponse>(entity =>
            {
                entity.HasKey(e => e.TeamResponseId)
                    .HasName("PRIMARY");

                entity.ToTable("fireteamresponse");

                entity.Property(e => e.TeamResponseId)
                    .HasColumnName("TeamResponseID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Status).HasColumnType("int(11)");

                entity.Property(e => e.TeamDepartmentId)
                    .HasColumnName("TeamDepartmentID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.TeamResponseContent)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Gpsdevice>(entity =>
            {
                entity.ToTable("gpsdevice");

                entity.Property(e => e.GpsDeviceId)
                    .HasColumnName("GpsDeviceID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.GpsDeviceName)
                    .IsRequired()
                    .HasMaxLength(255)
                    .IsUnicode(false);

                entity.Property(e => e.GpsDeviceNo)
                    .IsRequired()
                    .HasMaxLength(255)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Gpsdeviceconfig>(entity =>
            {
                entity.HasKey(e => e.ConfigId)
                    .HasName("PRIMARY");

                entity.ToTable("gpsdeviceconfig");

                entity.Property(e => e.ConfigId)
                    .HasColumnName("ConfigID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.BindId)
                    .HasColumnName("BindID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.BindType).HasColumnType("int(11)");

                entity.Property(e => e.GpsDeviceId)
                    .HasColumnName("GpsDeviceID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Gpsdevicerecord>(entity =>
            {
                entity.HasKey(e => e.GpsDeviceRecordGuid)
                    .HasName("PRIMARY");

                entity.ToTable("gpsdevicerecord");

                entity.Property(e => e.GpsDeviceRecordGuid)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Accuracy)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Altitude)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Bearing)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.GpsDeviceId)
                    .HasColumnName("GpsDeviceID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Latitude)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Longitude)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Speed)
                    .HasMaxLength(100)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Linchpin>(entity =>
            {
                entity.ToTable("linchpin");

                entity.Property(e => e.LinchpinId)
                    .HasColumnName("LinchpinID")
                    .HasColumnType("bigint(20)");

                entity.Property(e => e.LinchpinName)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.ParentId)
                    .HasColumnName("ParentID")
                    .HasColumnType("bigint(20)");
            });

            modelBuilder.Entity<Locainfo>(entity =>
            {
                entity.HasKey(e => e.LocaId)
                    .HasName("PRIMARY");

                entity.ToTable("locainfo");

                entity.Property(e => e.LocaId)
                    .HasColumnName("LocaID")
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.AddressCounty)
                    .IsRequired()
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.AddressTown)
                    .IsRequired()
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.AddressVillage)
                    .IsRequired()
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.Altitude).HasColumnType("decimal(18,2)");

                entity.Property(e => e.Latitude).HasColumnType("decimal(15,10)");

                entity.Property(e => e.Link).HasColumnType("int(11)");

                entity.Property(e => e.LocaHigh).HasColumnType("decimal(18,2)");

                entity.Property(e => e.LocaName)
                    .IsRequired()
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.LocaTypeId)
                    .IsRequired()
                    .HasColumnName("LocaTypeID")
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Longitude).HasColumnType("decimal(15,10)");

                entity.Property(e => e.PowerMode).HasColumnType("int(11)");
            });

            modelBuilder.Entity<Locatype>(entity =>
            {
                entity.ToTable("locatype");

                entity.Property(e => e.LocaTypeId)
                    .HasColumnName("LocaTypeID")
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.LocaImgPath)
                    .IsRequired()
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.LocaTypeName)
                    .IsRequired()
                    .HasMaxLength(100)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Locavideo>(entity =>
            {
                entity.HasKey(e => e.VideoId)
                    .HasName("PRIMARY");

                entity.ToTable("locavideo");

                entity.Property(e => e.VideoId)
                    .HasColumnName("VideoID")
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.FlvVideoPath)
                    .IsRequired()
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.HlsVideoPath)
                    .IsRequired()
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.Index).HasColumnType("int(11)");

                entity.Property(e => e.LocaId)
                    .IsRequired()
                    .HasColumnName("LocaID")
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.NUnit)
                    .HasColumnName("nUnit")
                    .HasColumnType("int(11)");

                entity.Property(e => e.VideoName)
                    .IsRequired()
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.VideoPath)
                    .IsRequired()
                    .HasMaxLength(500)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Maplayer>(entity =>
            {
                entity.HasKey(e => e.LayerId)
                    .HasName("PRIMARY");

                entity.ToTable("maplayer");

                entity.Property(e => e.LayerId)
                    .HasColumnName("LayerID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.LayerData)
                    .IsRequired()
                    .HasColumnType("longtext");

                entity.Property(e => e.LayerName)
                    .IsRequired()
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Message>(entity =>
            {
                entity.ToTable("message");

                entity.Property(e => e.MessageId)
                    .HasColumnName("MessageID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Content)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.CustomData)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.IsRead).HasColumnType("bit(1)");

                entity.Property(e => e.SendType).HasColumnType("int(11)");

                entity.Property(e => e.SendUserId)
                    .HasColumnName("SendUserID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.TargetUserId)
                    .HasColumnName("TargetUserID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Type).HasColumnType("int(11)");
            });

            modelBuilder.Entity<Messagesendtype>(entity =>
            {
                entity.ToTable("messagesendtype");

                entity.Property(e => e.MessageSendTypeId)
                    .HasColumnName("MessageSendTypeID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.MessageSendTypeName)
                    .IsRequired()
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Othermessage>(entity =>
            {
                entity.HasKey(e => e.MessageId)
                    .HasName("PRIMARY");

                entity.ToTable("othermessage");

                entity.Property(e => e.MessageId)
                    .HasColumnName("MessageID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Content)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.DepId)
                    .HasColumnName("DepID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.SendUserId)
                    .HasColumnName("SendUserID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Status).HasColumnType("int(11)");

                entity.Property(e => e.TargetUserId)
                    .HasColumnName("TargetUserID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Title)
                    .HasMaxLength(255)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Position>(entity =>
            {
                entity.ToTable("position");

                entity.Property(e => e.PositionId)
                    .HasColumnName("PositionID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.PositionName)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.Sort).HasColumnType("int(11)");
            });

            modelBuilder.Entity<Power>(entity =>
            {
                entity.ToTable("power");

                entity.Property(e => e.PowerId)
                    .HasColumnName("PowerID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.ParentId)
                    .HasColumnName("ParentID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Path)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.PowerKey)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.PowerName)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.ShowName)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.Sort).HasColumnType("int(11)");
            });

            modelBuilder.Entity<Record>(entity =>
            {
                entity.ToTable("record");

                entity.Property(e => e.RecordId)
                    .HasColumnName("RecordID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Applicant)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Content)
                    .HasMaxLength(3000)
                    .IsUnicode(false);

                entity.Property(e => e.CustomData)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.FireId)
                    .HasColumnName("FireID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Ip)
                    .HasColumnName("IP")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Type).HasColumnType("int(11)");

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Role>(entity =>
            {
                entity.ToTable("role");

                entity.Property(e => e.RoleId)
                    .HasColumnName("RoleID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Description)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.Enabled).HasColumnType("int(1)");

                entity.Property(e => e.RoleLevelId)
                    .HasColumnName("RoleLevelID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.RoleName)
                    .HasMaxLength(100)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Rolelevel>(entity =>
            {
                entity.ToTable("rolelevel");

                entity.Property(e => e.RoleLevelId)
                    .HasColumnName("RoleLevelID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.ParentLevelId)
                    .HasColumnName("ParentLevelID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.RoleLevelName)
                    .HasMaxLength(255)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Rolepower>(entity =>
            {
                entity.ToTable("rolepower");

                entity.Property(e => e.RolePowerId)
                    .HasColumnName("RolePowerID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.PowerId)
                    .HasColumnName("PowerID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.RoleId)
                    .HasColumnName("RoleID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Smsinfo>(entity =>
            {
                entity.HasKey(e => e.SmsId)
                    .HasName("PRIMARY");

                entity.ToTable("smsinfo");

                entity.Property(e => e.SmsId)
                    .HasColumnName("SmsID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.IsAchieved).HasColumnType("int(11)");

                entity.Property(e => e.MobileCode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.SendDepId)
                    .HasColumnName("SendDepID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.SendUserId)
                    .HasColumnName("SendUserID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.SmsContent)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.TargetDepId)
                    .HasColumnName("TargetDepID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.TargetUserId)
                    .HasColumnName("TargetUserID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.TargetUserName)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Smsmodel>(entity =>
            {
                entity.HasKey(e => e.ModelId)
                    .HasName("PRIMARY");

                entity.ToTable("smsmodel");

                entity.Property(e => e.ModelId)
                    .HasColumnName("ModelID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Content)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.ModelType).HasColumnType("int(11)");
            });

            modelBuilder.Entity<Taskinfo>(entity =>
            {
                entity.HasKey(e => e.TaskId)
                    .HasName("PRIMARY");

                entity.ToTable("taskinfo");

                entity.Property(e => e.TaskId)
                    .HasColumnName("TaskID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.DepId)
                    .HasColumnName("DepID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Describe)
                    .IsRequired()
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.FeedbackContent)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.IsRead).HasColumnType("int(11)");

                entity.Property(e => e.SendUserId)
                    .HasColumnName("SendUserID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Status).HasColumnType("int(11)");

                entity.Property(e => e.TargetUserId)
                    .HasColumnName("TargetUserID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.TaskName)
                    .IsRequired()
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.TaskType).HasColumnType("int(11)");
            });

            modelBuilder.Entity<Taskinfoimage>(entity =>
            {
                entity.HasKey(e => e.ImageId)
                    .HasName("PRIMARY");

                entity.ToTable("taskinfoimage");

                entity.Property(e => e.ImageId)
                    .HasColumnName("ImageID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.ImagePath)
                    .IsRequired()
                    .HasMaxLength(255)
                    .IsUnicode(false);

                entity.Property(e => e.TaskId)
                    .HasColumnName("TaskID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Userareaprobability>(entity =>
            {
                entity.ToTable("userareaprobability");

                entity.Property(e => e.UserAreaProbabilityId)
                    .HasColumnName("UserAreaProbabilityID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.AddressCounty)
                    .IsRequired()
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.AddressTown)
                    .IsRequired()
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.AddressVillage)
                    .IsRequired()
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.RoleId)
                    .HasColumnName("RoleID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");
            });

            modelBuilder.Entity<Userinfo>(entity =>
            {
                entity.HasKey(e => e.UserId)
                    .HasName("PRIMARY");

                entity.ToTable("userinfo");

                entity.Property(e => e.UserId)
                    .HasColumnName("UserID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.AccountName)
                    .IsRequired()
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.AddressCounty)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.AddressTown)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.AddressVillage)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.DepId)
                    .HasColumnName("DepID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Password)
                    .IsRequired()
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Phone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PositionId)
                    .HasColumnName("PositionID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.RealName)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.RoleId)
                    .HasColumnName("RoleID")
                    .HasColumnType("int(11)");

                entity.Property(e => e.Sort).HasColumnType("int(11)");
            });

            modelBuilder.Entity<Videoalarm>(entity =>
            {
                entity.HasKey(e => e.AlarmId)
                    .HasName("PRIMARY");

                entity.ToTable("videoalarm");

                entity.Property(e => e.AlarmId)
                    .HasColumnName("AlarmID")
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.AlarmImgPath)
                    .IsRequired()
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.AlarmType).HasColumnType("int(11)");

                entity.Property(e => e.AuditState).HasColumnType("int(11)");

                entity.Property(e => e.HorizontalAngle).HasColumnType("decimal(10,5)");

                entity.Property(e => e.LocaId)
                    .IsRequired()
                    .HasColumnName("LocaID")
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.LpfileName)
                    .HasColumnName("LPFileName")
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.Nunit)
                    .HasColumnName("NUnit")
                    .HasColumnType("int(11)");

                entity.Property(e => e.PitchAngle).HasColumnType("decimal(10,5)");
            });

            OnModelCreatingPartial(modelBuilder);
        }

        partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
    }
}
